/**
 * @file Reader.hh
 * @author Bono.ASUN.TamGitsun (gitsun.tam@outlook.com)
 * @brief 
 * @version 0.1
 * @date 2022-02-06
 * 
 * @copyright Copyright (c) 2022
 * 
 */


#pragma once


#include "IReader.hh"
#include <map>


namespace TGS::readers {


class Reader: public IReader
{
public:
    void set_property(const std::string & key, const std::string & value);
    const std::string & get_property(const std::string & key, const std::string & default_value);
    virtual bool open(void) = 0;
    virtual bool close(void) = 0;
    virtual int32_t send(uint8_t * data, int32_t size) = 0;
    virtual int32_t read(uint8_t * buffer, int32_t size) = 0;
protected:
    std::map<std::string, std::string> mProperties;
};


}
